<!DOCTYPE html>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  String basePathCl = request.getScheme()+"://"+request.getServerName()+path+"/";
%>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  <meta http-equiv="Expires" content="0">
  <meta http-equiv="Pragma" content="no-cache">
  <meta http-equiv="Cache-control" content="no-cache">
  <meta http-equiv="Cache" content="no-cache">
  <title>活动抽奖</title>
  <script src="<%=basePath%>weixin/js/jquery.min.js"></script>
  <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
  <script src="<%=basePath%>weixin/js/page/share.js"></script>
  <script src="<%=basePath%>weixin/js/jquery.sha1.js"></script>

  <script src="<%=basePath%>js/prize/js/base.js"></script>
  <link rel="stylesheet" href="<%=basePath%>js/prize/css/base.css" />
  <script>
    window.basePathUrl='<%=basePath%>';
    window.code = '${countNum}';
    $(function(){
      window.system.init();
      lottery.init('lottery');
      $("#lottery #start").click(function(){
        lottery.start();
      });
      $('.winner').myScroll({
        speed: 40,
        rowHeight: 26
      });
      window.shake();
      var wxShare = {
        id : 'wxe5b8956aa9f1485e',
        ticket : '${ticket}',
        title: '手机摇一摇，抽万元豪华大奖',
        desc : '小伙伴们快来一起抽大奖，还有更多奖品等着你~',
        imgUrl : '<%=basePathCl%>js/prize/images/img-1.jpg',
        link : '<%=basePath%>api/wx/prize/index'
      };
      wxShareInit(wxShare);
    })
  </script>
</head>
<body>
<div class="lottery-title">
  <img src="<%=basePath%>js/prize/images/title.png" />
</div>
<div id="lottery" class="clearfix">
  <table border="0" cellpadding="0" cellspacing="0">
    <tr class="dan">
      <td class="lottery-unit lottery-unit-0">
        <p>品牌摩托车</p>
        <img src="<%=basePath%>js/prize/images/prize/4.png">
      </td>
      <td class="lottery-unit lottery-unit-1">
        <p>iphone 7</p>
        <img src="<%=basePath%>js/prize/images/prize/5.png">
      </td>
      <td class="lottery-unit lottery-unit-2">
        再来<br/>一次
      </td>
    </tr>
    <tr>
      <td class="lottery-unit lottery-unit-7">
        <p>品牌头盔</p>
        <img src="<%=basePath%>js/prize/images/prize/1.png">
      </td>
      <td><a href="#" id="start"></a></td>
      <td class="lottery-unit lottery-unit-3">
        <p>品牌平衡车</p>
        <img src="<%=basePath%>js/prize/images/prize/6.png">
      </td>
    </tr>
    <tr class="dan">
      <td class="lottery-unit lottery-unit-6">
        再来<br/>一次
      </td>
      <td class="lottery-unit lottery-unit-5">
        <p>品牌电动车</p>
        <img src="<%=basePath%>js/prize/images/prize/3.png">
      </td>
      <td class="lottery-unit lottery-unit-4">
        <p>品牌手套</p>
        <img src="<%=basePath%>js/prize/images/prize/2.png">
      </td>
    </tr>
  </table>
</div>
<div class="rule">
  <div class="rule-title">
    活动规则
  </div>
  <div class="rule-content">
    <p>1、本次活动仅限新用户参加，每人只有一次中奖机会。</p>
    <p>2、用户必须去活动领取地点领取。</p>
    <p>3、本活动的最终解释权归开摩邦网所有。</p>
  </div>
</div>
<div class="winner">
  <ul>
    <c:forEach items="${prizeList}" var="prize">
    <li>恭喜${prize.prize_name}中了一个${prize.dial_module}</li>
    </c:forEach>
  </ul>

</div>
<div class="popupBox" id="prizeBox"></div>
</body>
</html>
